<!DOCTYPE html>
<html>
    <head></head>
    <body>
        <div id="foo"></div>
    <script>
        var e = document.getElementById("foo");
        alert(e.nodeName);
    </script>
    </body>
</html>
